<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<!-- 已知高宽的元素水平垂直居中方案 -->
		<style>
			*{
				margin: 0;
				padding: 0;
			}
			.wrap{
				position: relative;
				width: 400px;
				height: 400px;
				background-color: pink;
				margin: 0 auto;
			}
			.inner{
				position: absolute;
				left: 50%;
				top: 50%;
				margin-left: -50px;
				margin-top: -50px;
				width: 100px;
				height: 100px;
				background-color: deeppink;
			}
		</style>
	</head>
	<body>
		<div class="wrap">
			<div class="inner">
				inner
			</div>
		</div>
	</body>
</html>
